# coding: utf-8

import pandas as pd
df = pd.read_csv(r'F:\Work\Python\Pandas\study-pandas\file\datas\ratings.csv')
print(df.head())


# inplace：是否修改当前df
# drop：是否删除原字段
# df.set_index('userId', inplace=True, drop=False)
# print(df.head())
# print(df.index)
#
# print(df.loc[df['userId'] == 100].head())
# print(df.loc[100].head())

# 自动对齐运算
s1 = pd.Series([1, 2, 3, 4], index=['a', 'b', 'c', 'd'])
s2 = pd.Series([2, 3, 4, 5], index=['b', 'c', 'd', 'e'])
print(s1 + s2)
